package exatrez.stripes;

import able.stripes.JSP;
import exatrez.model.User;
import net.sourceforge.stripes.action.DefaultHandler;
import net.sourceforge.stripes.action.RedirectResolution;
import net.sourceforge.stripes.action.Resolution;
import net.sourceforge.stripes.action.UrlBinding;


@UrlBinding("/welcome")
public class WelcomeActionBean extends BaseActionBean {
    
    private User pengguna;

    @DefaultHandler
    public Resolution welcome() {
        pengguna = getContext().getCurrentUser();      
        if (pengguna == null) return new RedirectResolution(LoginActionBean.class);        
        return new JSP("home.jsp");
    }   

    public User getPengguna() {
        return pengguna;
    }

    public void setPengguna(User pengguna) {
        this.pengguna = pengguna;
    }
    
    
    
    
}
